package tech.senri.iot.socket.model

import io.netty.buffer.Unpooled
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import tech.senri.iot.socket.service.util.getArray

@ApiModel("远程测试功能")
class RemoteTestRequest : RequestMessage()
{
    override fun contentData(): ByteArray
    {
        if (aisleNo == 0)
        {
            return Unpooled.buffer().writeByte(0xff).writeByte(0xff).getArray()
        }
        return Unpooled.buffer().writeShort(aisleNo).getArray()
    }

    /**
     * 货道号
     */
    @ApiModelProperty("要测试的货道号，数值为0时表示依次启动所有货道测试。板卡不需要回复", required = true)
    var aisleNo: Int = 0
}
